home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Libraries / TurboTCP 2.0.1 / TurboTCP source / CTCPApplication.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-03  |  1.7 KB  |  64 lines  |  [TEXT/MPCC]

  1. /*
  2. ** CTCPApplication.h
  3. **
  4. **    TurboTCP support library
  5. **    Application subclass
  6. **
  7. **    Copyright © 1993-94, FrostByte Design / Eric Scouten
  8. **
  9. */
  10.  
  11. #pragma once
  12.  
  13. #include "CApplication.h"
  14.  
  15.  
  16. /*______________________________________________________________________
  17. **
  18. ** CTCPApplication
  19. **
  20. **    This application subclass should be used in place of the standard CApplication. It hooks
  21. **    into the event loop to handle MacTCP events which were queued at interrupt time, and
  22. **    takes care of opening and closing the MacTCP driver at the appropriate times.
  23. **
  24. **    NOTE: It is highly recommended that you enable background processing by turning on
  25. **    the “Background Null Events” SIZE resource flag. See the Set Project Type… dialog
  26. **    under the Project menu.
  27. **
  28. **    By default, TurboTCP sets the maximum sleep time to 90 ticks (1.5 seconds). Feel free
  29. **    to modify this behavior. However, I recommend that you use a setting somewhat lower
  30. **    than TCL’s default of 600 ticks (10 seconds). You may wish to use a lower value for
  31. **    high-performance applications, or a higher value to be more MultiFinder-friendly.
  32. **
  33. */
  34.  
  35. class CTCPApplication : public CApplication {
  36.  
  37.     TCL_DECLARE_CLASS;
  38.     
  39.     short            maxTCPEvents;                        // maximum number of TCP events to process
  40.     long                maxTCPTicks;                        // maximum ticks to spend in TCP event loop
  41.  
  42.  
  43.     // constructors
  44.  
  45. public:
  46.                     CTCPApplication();
  47.                     CTCPApplication(short extraMasters, Size aRainyDayFund,
  48.                         Size aCriticalBalance, Size aToolboxBalance);
  49.     void                ITCPApplication(short extraMasters, Size aRainyDayFund, Size aCriticalBalance,
  50.                         Size aToolboxBalance);
  51.  
  52.     virtual void        MakeHelpers();
  53.  
  54.  
  55.     // application shutdown
  56.     
  57.     virtual Boolean        Quit();
  58.  
  59.  
  60.     // foreground/background event trapping
  61.  
  62.     virtual void        Process1Event();
  63. };
  64.